1. Field of the Invention
The invention relates to scan converting methods and apparatus for performing a scan conversion between a raster sequence scan and a block sequence scan which are executed at the time of various image processes, such as image compressing and expanding process, and the like in a television, a scanner, a printer, and the like.
2. Related Background Art
Hitherto, in case of performing a JPEG system image compressing process or the like such as to image process image data every block, it is necessary to convert an order of scanning from an ordinary raster scan sequence of an image as shown in FIG. 1A to a block scan sequence as shown in FIG. 1B. In case of expanding the image, contrarily, it is necessary to reversely convert the scanning order from the block sequence to the raster sequence. For this purpose, as shown in FIG. 1C, two block buffers are provided and are switched. Namely, when converting from the raster sequence to the block sequence, one block buffer is written in accordance with the raster sequence and the other block buffer is read out in accordance with the block sequence. When reversely converting from the block sequence to the raster sequence, one block buffer is written in accordance with the block sequence and the other block buffer is read out in accordance with the raster sequence.
FIG. 2 is a block diagram showing a conventional scan converting apparatus.
In FIG. 2, a raster counter 101 generates an ordinary address for a raster sequence (hereinafter, referred to as a raster address). A block count conversion unit 102 converts the raster address into an address for a block sequence (hereinafter, referred to as a block address). The above two addresses are switched by a multiplexer 103 in accordance with the conversion or reverse conversion and are supplied to two block buffers 104 and 105, respectively. Input/output data is transmitted and received through input/output buffers 106 and 107.
Namely, when converting from the raster sequence to the block sequence, the I/O buffer 106 inputs raster data from the outside such as a camera or the like and is divided into blocks by using the block buffers 104 and 105, and the block data is outputted from the I/O buffer 107 to an image compressing unit or the like. Upon reverse conversion, the expanded block data is inputted to the I/O buffer 107 and is converted to the data of the raster sequence by using the block buffers 104 and 105 and is outputted as raster data from the I/O buffer 106 to a monitor or the like.
FIG. 3 shows a construction of the block count conversion unit 102. In this instance, FIG. 3 shows a case of pixels in which a size of one block comprises 8 pixels (in the vertical direction).times.8 pixels (in the lateral direction).
In FIG. 3, raster addresses which are advanced one by one to ordinary addresses A.sub.0 to A.sub.n from the raster counter 101 are received, address lines of A.sub.3 to A.sub.6 are replaced to upper addresses and are converted to addresses such that middle addresses are set to A.sub.6 to A.sub.r and lower addresses are set to A.sub.0 to A.sub.2, and those addresses are outputted as block addresses B.sub.0 to B.sub.n from an output buffer 109.
Namely, after the addresses of A.sub.0 to A.sub.6 were counted up to "8" in the horizontal direction, the addresses are again counted to "8" with respect to the next line. By repetitively executing the above operations with respect to eight lines, block addresses of one block are obtained. By continuing those operations for 1H, block addresses of one block buffer are derived.
As block addresses in the reverse conversion, the block addresses obtained by converting the upper addresses, middle addresses, and lower addresses of A.sub.0 to A.sub.n into A.sub.3 to A.sub.n-3, A.sub.n-2, to A.sub.r, and A.sub.0 to A.sub.2 are used.
Therefore, the addresses of lower three bits of A.sub.0 to A.sub.2 (corresponding to eight pixels) don't always need to be converted. In the above case, it is necessary to set a condition such that the addresses of a horizontal width (1H) of the block buffer are the power of "2".
In the conventional apparatus mentioned above, however, two sets of block buffers 104 and 105 are necessary, so that a circuit scale is large in proportion to the number of horizontal pixels of a picture plane. Particularly, as compared with the number of pixels of an image to monitor, since the number of horizontal pixels of an image which is handled by a scanner, printer, or the like of a high resolution is extraordinarily large, a scale of the block buffer is very large. When the block buffers are accessed, circuits for producing two kinds of addresses of the raster sequence and block sequence are necessary. There is a problem such that in order to switch each of the block buffers to the raster sequence and the block sequence, a circuit such as a multiplexer or the like to switch two kinds of addresses, a switching circuit such as input/output buffers 106 and 107 or the like to alternately supply the data to the two block buffers or to alternately extract the data from the two block buffers, and the like are necessary, so that in addition to those circuits, a whole circuit scale is extremely large.